package com.example.greedysnake.datas;

import com.example.greedysnake.enums.MovePosition;

public class SnakeRectPosition {
    // canvas 位置
    float left;
    float top;
    float right;
    float bottom;

    // 矩形填充属性
    boolean fill;
    int color;

    // 网格坐标
    int x;
    int y;

    MovePosition movePosition = MovePosition.RIGHT;

    public SnakeRectPosition() {
    }

    public SnakeRectPosition(SnakeRectPosition snakeRectPosition) {
        this.left = snakeRectPosition.getLeft();
        this.top = snakeRectPosition.getTop();
        this.right = snakeRectPosition.getRight();
        this.bottom = snakeRectPosition.getBottom();
        this.fill = snakeRectPosition.isFill();
        this.color = snakeRectPosition.getColor();

        this.x = snakeRectPosition.getX();
        this.y = snakeRectPosition.getY();
        this.movePosition = snakeRectPosition.getMovePosition();
    }

    public SnakeRectPosition(float left, float top, float right, float bottom, boolean fill) {
        this.left = left;
        this.top = top;
        this.right = right;
        this.bottom = bottom;
        this.fill = fill;
    }

    public SnakeRectPosition(float left, float top, float right, float bottom, boolean fill, int color, int x, int y, MovePosition movePosition) {
        this.left = left;
        this.top = top;
        this.right = right;
        this.bottom = bottom;
        this.fill = fill;
        this.color = color;
        this.x = x;
        this.y = y;
        this.movePosition = movePosition;
    }

    public SnakeRectPosition(int startPositionX, int startPositionY) {
        this.x = startPositionX;
        this.y = startPositionY;
    }

    public float getLeft() {
        return left;
    }

    public void setLeft(float left) {
        this.left = left;
    }

    public float getTop() {
        return top;
    }

    public void setTop(float top) {
        this.top = top;
    }

    public float getRight() {
        return right;
    }

    public void setRight(float right) {
        this.right = right;
    }

    public float getBottom() {
        return bottom;
    }

    public void setBottom(float bottom) {
        this.bottom = bottom;
    }

    public boolean isFill() {
        return fill;
    }

    public void setFill(boolean fill) {
        this.fill = fill;
    }

    public int getColor() {
        return color;
    }

    public void setColor(int color) {
        this.color = color;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public MovePosition getMovePosition() {
        return movePosition;
    }

    public void setMovePosition(MovePosition movePosition) {
        this.movePosition = movePosition;
    }
}
